
from base_config import HOUSE_HOST
from pages.base_page import BasePage
from pages.elements import Elements
from pages.house_list_page import HouseListPage
from pages.house_zu_page import HouseZuPage

'''
登录进去之后
'''
class HouseIndexPage(BasePage):
    url = HOUSE_HOST + 'index'

    # 打开房源列表
    def open_house_list(self):
        self.click_element(Elements.HOUSE_LIST_MENU)
        self.sleep(2)
        self.click_element(Elements.HOUSE_LIST_LINK)
        return HouseListPage()

    # 打开在租列表
    def open_zu_list(self):
        self.click_element(Elements.HOUSE_ZU_MENU)
        self.sleep(2)
        self.click_element(Elements.HOUSE_ZU_LINK)
        return HouseZuPage()
